.colorSwitch {
  background-color: #E6A555;
  width: 70px;
  height: 35px;
  border-radius: 35px;
  padding: 8px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  transition: background-color 300ms ease-in;
  z-index: 1;

  &.day {
    background-color: #E6A555;
  }

  &.night {
    background-color: #2c4b98;

    .knob {
      transform: translateX(100%) rotate(25deg);
    }

    .knob::before {
      transform: translateX(100%) rotate(45deg);
      background-color: #2c4b98;
    }
  }
}

.knob {
  width: 50%;
  height: 0;
  padding-bottom: 50%;
  background: #fff;
  border-radius: 50%;
  transform: translateX(0);
  transition: transform 400ms cubic-bezier(0.5, 0, 0.5, 1);
  position: relative;
  border: none;

  &::before {
    content: '';
    display: block;
    background-color: #E6A555;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    left: -100%;
    transform-origin: center top;
    transform: translateX(0);
    transition: transform 400ms cubic-bezier(0.5, 0, 0.5, 1), background-color 300ms ease-in;
  }
}
